1. Field of the Invention
The present invention relates to an image reading apparatus and a focusing control method, and particularly to an image reading apparatus for reading images of an original to be read, such as a photographic film, on which images are recorded, and to a focusing control method applied to the image reading apparatus.
2. Description of the Related Art
There has conventionally been known an image processing system in which film images recorded on a photographic film are read by an image reading apparatus including image-formation means, an image sensor, and the like, and image processing such as various corrections is effected for image data obtained by the aforementioned reading, and thereafter, an image is recorded on a recording material or displayed on a display. The photographic film as mentioned herein is a film in which negative or positive images are made visible by development processing after the photographing of a subject thereon.
Some image reading apparatuses used by this type of image processing system allow reading of a so-called slide in which a photographic film is held on a film mount provided for each kind of photographic film. In such image reading apparatuses, in order to obtain image data of high quality, automatic focusing control is performed for a film image of a slide to be read so that a position at which an image is formed by image-formation means and a position at which light is received by an image sensor coincide with each other.
However, a photographic film is generally apt to be warped, and therefore, there are many cases in which a photographic film is warped even in a state of being held on a film mount. When automatic focusing control is performed for such a warped photographic film, although an optimal automatic focused state can be set for a specified position of a film image, focusing cannot be made at other positions.
A technique which can be applied to solve the above-described problem is disclosed in Japanese Patent Application Laid-Open (JP-A) No. 4-198929: in an image reading apparatus, comprising a line CCD as an image sensor, which repeats reading image corresponding to one line along a main scan direction (that is, a direction in which pixels of the line CCD are arranged) of film image, and synchronously with the reading of image moving a photographic film in a sub-scan direction by a distance corresponding to one line, to thereby allow reading of one image, prior to reading of film image, focusing positions at a plurality of positions located in the sub-scan direction of the film image are detected, and thereafter, based on the focusing positions, focusing positions between the plurality of positions are each calculated by approximation or interpolation, and when reading of film images is performed, each time the film images are moved in the sub-scan direction, focal adjustment in which image-formation means and the image sensor are moved to obtain the previously calculated focusing positions at the plurality of positions on the film image in the sub-scan direction is repeatedly performed, to thereby maintain constantly a focused state of the photographic film with respect to the sub-scan direction.
However, in the technique disclosed in JP-A No. 4-198929, the focused state is set each time the photographic film is moved in the sub-scan direction. Accordingly, there are drawbacks in that the time required for reading an image becomes longer, and although an effect is obtained for warping caused in the sub-scan direction of the photographic film, an effect is not obtained for warping caused in the main scan direction thereof.
The present invention has been devised in order to settle the above-described drawbacks and an object thereof is to provide an image reading apparatus which allows reading of image in a short time and setting of a focused state which is effective for warping caused in a main scan direction of an original to be read.
In order to achieve the above-described object, in accordance with a first aspect of the present invention, there is provided an image reading apparatus comprising:
a light source which illuminates an original to be read, on which an image is recorded;
image-formation means which allows one of light transmitted through the original to be read or light reflected by the original to be read, to form an image;
an image sensor which reads the image recorded on the original to be read and outputs read image as image data;
moving means for moving at least one of at least a portion of said image-formation means, said image sensor, and the original to be read in a direction along an optical axis of said image-formation means; and
control means which, based on a plurality of focusing positions obtained by controlling said moving means so that focusing control which allows a position where an image is formed by said image-formation means and a position of said image sensor to coincide with each other is effected for a plurality of regions of the image, obtains a final focusing position, and which controls said moving means so that at least one of at least a portion of said image-formation means, said image sensor, and the original to be read moves to a position based on the final focusing position.
In accordance with the image reading apparatus of the first aspect of the present invention, the original to be read on which the image is recorded is illuminated by the light source, light transmitted through the original to be read or light reflected by the original to be read is allowed to form an image by the (optical) image-formation means, and the image recorded on the original to be read is read by the image sensor in a state of being separated into a plurality of pixels and further outputted as image data. The aforementioned original to be read includes a transparent original such as a photographic film, and a reflection original such as a photographic print. Further, the image sensor includes a line CCD, an area CCD, and a photoelectric element other than CCD.
Further, the image reading apparatus of the first aspect includes the moving means for moving at least one of at least a portion of the image-formation means, the image sensor, and the original to be read in the direction along the optical axis of the image-formation means. Based on the plurality of focusing positions obtained by controlling the moving means so that automatic focusing control in which the position where an image is formed by the image-formation means and the position of the image sensor coincides with each other is performed for the plurality of regions of the image, the final focusing position is obtained by the control means. The moving means is controlled by the control means so that at least one of at least a portion of the image-formation means, the image sensor, and the original to be read moves to the position based on the final focusing position.
As the aforementioned image-formation means, a lens or a lens group can be used. Alternatively, a zoom lens whose magnification can be varied by moving a part of lenses may also be used. When a lens or a lens group is used, the entire image-formation means is moved, and when a zoom lens is used, a portion of the image-formation means is moved.
As described above, according to the image reading apparatus of the first aspect, the final focusing position is obtained based on the plurality of focusing positions for the plurality of regions of the image recorded on the original to be read, and at least one of at least a portion of the image-formation means, the image sensor, and the original to be read is located at the position based on the final focusing position. Accordingly, setting of a focused state suitable for each of the plurality of regions in the image becomes possible. Even when warping is caused in the original to be read, a focused state which is effective for warping, in the main scan direction, of the original to be read can be set with the aforementioned plurality of regions being located along the main scan direction of the original to be read, and a focused state which is effective for warping, in a sub-scan direction, of the original to be read can be set with the aforementioned plurality of regions being located along the sub-scan direction of the original to be read. Further, reading of the image is allowed only based on the determined final focusing position. As a result, the reading of the image is allowed in an extremely short time as compared with a case in which automatic focusing control is performed each time the original to be read is moved in the sub-scan direction.
An image reading apparatus according to a second aspect of the present invention is characterized in that, in the image reading apparatus of the first aspect, in order that a region of a main subject recorded on the image be included in a range of the depth of field of said image-formation means when said control means controls said moving means so that at least one of at least a portion of said image-formation means, said image sensor, and the original to be read moves to the position based on the final focusing position, said control means obtains the final focusing position based on the plurality of focusing positions and the depth of field.
According to the image reading apparatus of the second aspect, such that the region of the main subject recorded on the image is included in the range of the depth of field of the image-formation means, when the moving means is controlled so that at least one of at least a portion of the image-formation means, the image sensor, and the original to be read is moved to the position based on the final focusing position, the final focusing position is obtained by the control means provided in the image reading apparatus of the first aspect on the basis of the plurality of focusing positions and the aforementioned depth of field.
As described above, according to the image reading apparatus of the second aspect, the same effect as that of the first aspect can be obtained, and further, the final focusing position is obtained based on the plurality of focusing positions and the aforementioned depth of field so that the region of a main subject recorded on the image is included in the range of depth of field of the image-formation means. Accordingly, a focused state suitable for an image corresponding to the region of a main subject can be set.
An image reading apparatus according to a third aspect of the present invention is characterized in that, in the image reading apparatus of the first or second aspect, said control means obtains the plurality of focusing positions based on a smoothed value of respective image contrast values at a plurality of positions in the plurality of regions.
According to the image reading apparatus of the third aspect, the aforementioned plurality of focusing positions are obtained based on the smoothed value of respective image contrast values at the plurality of positions in the above-described plurality of regions by the control means provided in the image reading apparatus according to the first or second aspect.
That is, as is well known, the focusing position can be obtained by detecting a position having the maximum image contrast value (a so-called image contrast approach). However, in a case in which the image reading apparatus of the present invention is used in a state of being installed at, for example, a position where vibration is apt to be generated, when a large vibration is generated while measuring an image contrast value of a position which is not a real focusing position being obtained, the image-formation means, the image sensor, and the like are displaced largely in the direction along the optical axis, and the image contrast value at the position may become extremely large as compared with those at other positions. In this case, the position may be erroneously confirmed as a focusing position and a correct focusing position cannot be detected. Accordingly, in the third aspect of the present invention, the image contrast values are smoothed so as to prevent occurrence of an extremely large image contrast value.
As described above, according to the image reading apparatus of the third aspect, the same effects as those of the first and second aspects can be obtained, and the plurality of focusing positions are obtained based on the smoothed value of respective image contrast values at the plurality of positions in the plurality of regions. Accordingly, mistaken detection of the focusing position, caused by vibration of the apparatus, or the like, can be prevented, and as a result, a suitable focusing position can be set.
An image reading apparatus according to a forth aspect of the present invention is characterized in that, in the image reading apparatus of the first or second aspect, the smoothed value is a moving average value of the respective image contrast values.
In a fourth aspect of the present invention, as the smoothed value in the image reading apparatus of the third aspect, the moving average value of the image contrast values can be used.
On the other hand, as in the aforementioned third and fourth aspects of the present invention, even when the focusing position is obtained based on the smoothed value of the image contrast values, an accurate focusing position is not necessarily obtained.
When the position having the maximum evaluation value (for example, the maximum image contrast value) in a region to be subjected to focusing control (that is, a search area) to the direction along an optical axis of the image-formation means is set as a focusing position, for example, when as shown in FIG. 27A, the maximum evaluation value is located at an end portion of the search area, there is a high possibility that an actual maximum value (corresponding to the focusing position) may be located outside the search area (in FIG. 27A, a right-handed side, separated from the search area, on the paper thereof).
Further, there are many cases in which the actual evaluation value greatly varies due to various noises in addition to vibration of the apparatus. In this case, as shown in FIG. 27B, when a difference between the maximum and minimum values of the evaluation value is small, the position of the maximum value is not necessarily the focusing position.
FIGS. 28A to 28F show measurement results of evaluation values (image contrast values) in various images when the original to be read is a negative film in 135 magazines. FIGS. 29A to 29H show measurement results of evaluation values (image contrast values) in various images when the original to be read is a reversal film in 135 magazines. FIGS. 28A and 28B show measurement results of a black image and results of smoothing thereof, FIGS. 28C and 28D show measurement results of a common image and results of smoothing thereof, and FIGS. 28E and 28F show measurement results of an unprocessed but processed negative image and results of smoothing thereof. Further, FIGS. 29A and 29B show measurement results of a black image and results of smoothing thereof, FIGS. 29C and 29D shows measurement results of an image of night sky and results of smoothing thereof, FIGS. 29E and 29F show measurement results of a common image and results of smoothing thereof, and FIGS. 29G and 29H show measurement results of a transparent image and results of smoothing thereof. In the graphs shown in FIGS. 28A to 28F and 29A to 29H, the vertical axis of each graph indicates an image contrast value and the horizontal axis indicates a position in the direction along an optical axis of the image-formation means. Further, xe2x80x9cfront sidexe2x80x9d, xe2x80x9ccenterxe2x80x9d, and xe2x80x9cback sidexe2x80x9d shown in these drawings indicate different positions of the image sensor with respect to the direction in which pixels are arranged.
As shown in FIGS. 28A, 28C, 28E and FIGS. 29A, 29C, 29E, 29G, the image contrast value prior to smoothing varies greatly and a plurality of image contrast values are located in the vicinity of the maximum value. Accordingly, there is a high possibility that false focusing be made which results from that the position of the maximum value is merely considered as the focusing position.
On the other hand, it can be considered from the results obtained by smoothing respective measurement results that each maximum value is clarified in, for example, FIGS. 28D and 28F, or FIGS. 29D and 29F and a precise focusing position can thereby be obtained. However, for example, in the positions indicated by xe2x80x9cfront sidexe2x80x9d and xe2x80x9cback sidexe2x80x9d in FIG. 29H, the difference between the maximum and minimum values of the image contrast value is small, and in this distribution of the image contrast value, it is considerably difficult to obtain a precise focusing position.
In view of the aforementioned, an image reading apparatus according to a fifth aspect of the present invention is characterized in that, in the image reading apparatus according to any one of the first to fourth aspects of the present invention, in performing focusing control for the plurality of regions of the image, when a predetermined condition corresponding that focusing is made is not satisfied, said control means changes a condition related to the focusing control and performs again the focusing control.
According to the fifth aspect of the present invention, in a case in which focusing control for the plurality of regions of the image is, when the predetermined condition corresponding that focusing can be considered to have been made is not satisfied, a condition related to focusing control is altered and focusing control is performed again by the control means in the image reading apparatus according to any one of the first to fourth aspects.
The above-described predetermined condition corresponding that focusing can be considered to have been made includes, for example, in performing focusing control based on image contrast values at a plurality of locations, a case in which the ratio of the maximum value to the minimum value of the image contrast values at the plurality of locations is a predetermined value (for example, 1.5) or more, a case in which the maximum value of the image contrast values at the plurality of locations is not located at any ends of the plurality of locations, and the like. Further, the above-described condition related to the focusing control includes a position on the original to be read, which is to be subjected to focusing control, a search area in which search for a focusing position is made, a reading position in the image sensor, and the like.
The image reading apparatus according to the fifth aspect can achieve the same effects as those of the first to fourth aspects of the present invention, and further, in performing focusing control for the plurality of regions of the image, when the predetermined condition corresponding that focusing can be considered to have been made is not satisfied, the condition related to focusing control is altered and focusing control is performed again. Accordingly, a more accurate focusing position can be detected, and as a result, a more desirable focused state can be set.
Further, an image reading apparatus according to a sixth aspect of the present invention is characterized in that, in the image reading apparatus according to any one of the first to fifth aspects, prior to the focusing control for the plurality of regions of the image, said control means adjusts an output level of said image sensor.
In the image reading apparatus according to the sixth aspect of the present invention, prior to focusing control for the plurality of regions of the image, the output level of the image sensor is adjusted by the control means in the image reading apparatus according to any one of the first to fifth aspects of the present invention.
Namely, for example, when focusing control is performed based on image contrast values at a plurality of locations, there exist problems that if the output level of the image sensor is extremely high, a false peak (which is not a real peak of the image contrast value, but is apparently regarded as a peak) occurs, and if the output level of the image sensor is extremely low, a desired image contrast value cannot be obtained. The sixth aspect of the present invention is provided in view of the aforementioned problems.
Meanwhile, adjustment of the output level of the image sensor can be made by adjustment of an amount of light irradiated from a light source or the like, adjustment of charge accumulation time of CCD (when a CCD sensor is used as the image sensor), and the like.
As described above, the image reading apparatus according to the sixth aspect of the present invention can achieve the same effects as those of the first to fifth aspects of the present invention, and further, prior to the focusing control for the plurality of regions of the image, adjustment of the output level of the image sensor is made. Accordingly, it is possible to avoid a problem that a false peak occurs or a desired image contrast value cannot be obtained.
A focusing control method according to a seventh aspect of the present invention is constructed in such a manner that focusing control which allows a position where an image is formed by image-formation means, the image-formation means causing one of light transmitted through an original to be read or light reflected by the original to be read so as to form the image, and a position of an image sensor, the image sensor reading an image recorded on the original to be read and outputting read image as image data, to coincide with each other is performed for a plurality of regions of the image recorded on the original to be read, by moving at least one of at least a portion of the image-formation means, the image sensor, and the original to be read in a direction along an optical axis of said image-formation means to obtain a plurality of focusing positions,
wherein based on the plurality of focusing positions obtained by the focusing control, a final focusing position is obtained; and
at least one of at least the portion of the image-formation means, the image sensor, and the original to be read is controlled so as to be moved to a position based on the final focusing position.
In the focusing control method according to the seventh aspect of the present invention, the final focusing position is obtained based on the plurality of focusing positions for the plurality of regions of the image recorded on the original to be read, and at least one of a portion of the image-formation means, the image sensor, and the original to be read is located at a position based on the final focusing position. Accordingly, in the same way as in the first aspect of the present invention, a desirable focused state can be set for each of the images in the above-described plurality of regions, and even when warping is caused in the original to be read, by providing the above-described plurality of regions along the main scan direction of the original to be read, a focused state which is effective for warping caused in the main scan direction of the original to be read can be set and by providing the above-described plurality of regions along the sub scan direction of the original to be read, a focused state which is effective for warping caused in the sub scan direction of the original to be read can be set. Further, image reading can be effected only based on the determined final focusing position. As a result, as compared with a case in which focusing control is performed each time the original to be read is moved in the sub-scan direction, image reading can be effected in a considerably short time.
A focusing control method according to an eighth aspect of the present invention is characterized in that, in the focusing control method according to the seventh aspect, in order that a region of a main subject recorded on the image be included in a range of a depth of field of the image-formation means when at least one of the at least the portion of the image-formation means, the image sensor, and the original to be read is controlled so as to be moved to the position based on the final focusing position, the final focusing position is obtained based on the plurality of focusing positions and the depth of field.
The focusing control method according to the eighth aspect of the present invention can achieve the same effects as those of the seventh aspect of the present invention, and further, in order that the region of the main subject recorded on the image is included in a depth of field of the image-formation means, the final focusing position is obtained based on the plurality of focusing positions and the depth of field. Accordingly, in the same way as in the second aspect of the present invention, a focused state suitable for an image corresponding to the region of the main subject can be set.
Further, a focusing control method according to a ninth aspect of the present invention is characterized in that, in the focusing control method according to any one of seventh or eighth aspect, wherein the plurality of focusing positions are obtained based on a smoothed value of image contrast values at a plurality of positions in the plurality of regions.
The focusing control method according to the ninth aspect of the present invention can achieve the same effects as those of the seventh and eighth aspects of the present invention, and a plurality of focusing positions are obtained based on a smoothed value of the image contrast values at the plurality of locations in each of the plurality of regions. Accordingly, in the same way as in the third aspect of the present invention, false detection of the focusing position, which is caused by vibration of the apparatus, or the like, can be prevented. As a result, a desirable focusing position can be set.
In a focusing control method according to a tenth aspect of the present invention, the smoothed value is a moving average value of the image contrast values.
Further, a focusing control method according to an eleventh aspect of the present invention is characterized in that, in any one of the seventh to tenth aspects of the present invention, in performing focusing control for the plurality of regions of the image, when a predetermined condition corresponding that focusing is made is not satisfied, a condition related to focusing control is altered and focusing control is performed again.
The focusing control method according to the eleventh aspect of the present invention can achieve the same effects as those of the seventh to tenth aspects of the present invention, and in performing focusing control for the plurality of regions of the image, when the predetermined condition that focusing can be considered to have been made is not satisfied, the condition related to the focusing control is altered and focusing control is performed again. Accordingly, in the same way as in the fifth aspect of the present invention, a more precise focusing position can be detected, and as a result, a more desirable focused state can be set.
A focusing control method according to a twelfth aspect of the present invention is characterized in that, in the focusing control method according to any one of the seventh to eleventh aspects, prior to the focusing control for the plurality of regions of the image, an output level of said image sensor is adjusted.
The focusing control method according to the twelfth aspect of the present invention can achieve the same effects as those of the seventh to eleventh aspects of the present invention, and prior to focusing control for the plurality of regions of the image, the output level of the image sensor is adjusted. Accordingly, in the same way as in the sixth aspect of the present invention, it is possible to settle a problem that a false peak occurs or a desired image contrast value cannot be obtained.